package org.spring.springboot.service;

import org.spring.springboot.config.ScheduleCron;
import org.springframework.stereotype.Service;

@Service
public class TestService {

    @ScheduleCron(scheduleKey = "cron1Test", cronName = "测试一下", cronExpression = "*/10 * * * * ?")
    public void testService() {
        System.out.println(1);
    }


    @ScheduleCron(scheduleKey = "cron2Test", cronExpression = "*/59 * * * * ?")
    public void testService2() {
        System.out.println(3);
    }

    @ScheduleCron(scheduleKey = "errorTest", cronExpression = "*/15 * * * * ?")
    public void errorTest() {
        int a = 1 / 0;
    }
}
